﻿using System;
using Gp.Scripts.GameLogic;
using UnityEngine;

namespace GP.Scripts.City {
    [Serializable]
    public class DynamicObjectInfo {
        public TransformInfo trans;
        public bool isActive;
        public string key;


        public DynamicObjectInfo() { }

        public DynamicObjectInfo(GameObject obj, string key) {
            var transform = obj.transform;
            this.trans = new TransformInfo(transform.position, transform.rotation);
            isActive = obj.activeInHierarchy;
            this.key = key;
        }
        
        public DynamicObjectInfo(TransDynamicObject obj, string key) {
            var transform = obj.transform;
            this.trans = new TransformInfo(transform.position, transform.rotation);
            isActive = obj.IsActive;
            this.key = key;
        }
    }
}